package com.dq;

import com.dq.service.UserService;
import com.spring.AnnotationConfigApplicationContext;

/**
 * @ClassName: ComponentScanTestApplication
 * @Description: 启动容器
 * @Author: spring-source_小强 (QQ:2680825683)
 * @Since: 2023/5/8 8:59
 */
public class DuXiaoQTestApplication {
    public static void main(String[] args) {
        //开启
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
//        System.out.println("context.getBean(\"userService\") = " + context.getBean("userService"));
        UserService userService = (UserService) context.getBean("userService");
        userService.test();
    }
}
